﻿using System.Collections.Generic;

namespace SocialFront.Providers.Relationship
{
    [SectionName("SocialFrontRelationship")]
    public abstract class RelationshipBase : SocialFrontProviderBase
    {
        //public abstract IList<Entities.Relation> GetRelations(int objectId);

        /// <summary>
        /// Gets the friends of member.
        /// </summary>
        /// <param name="memberId">The member id.</param>
        /// <returns></returns>
        public abstract IList<Entities.Member> GetFriendsOfMember(int memberId);

        /// <summary>
        /// Creates the friends of member.
        /// </summary>
        /// <param name="memberId">The member id.</param>
        /// <returns></returns>
        public abstract void CreateFriendsOfMember(int memberId);

        /// <summary>
        /// Determines whether [is member friend] [the specified member id].
        /// </summary>
        /// <param name="memberId">The member id.</param>
        /// <returns>
        /// 	<c>true</c> if [is member friend] [the specified member id]; otherwise, <c>false</c>.
        /// </returns>
        public abstract bool IsMemberFriend(int memberId);

        /// <summary>
        /// Gets the fans of member.
        /// </summary>
        /// <param name="memberId">The member id.</param>
        /// <returns></returns>
        public abstract IList<Entities.Member> GetFansOfMember(int memberId);

        /// <summary>
        /// Creates the fans of member.
        /// </summary>
        /// <param name="memberId">The member id.</param>
        public abstract void CreateFansOfMember(int memberId);

        /// <summary>
        /// Determines whether [is member fan] [the specified member id].
        /// </summary>
        /// <param name="memberId">The member id.</param>
        /// <returns>
        /// 	<c>true</c> if [is member fan] [the specified member id]; otherwise, <c>false</c>.
        /// </returns>
        public abstract bool IsMemberFan(int memberId);

        /// <summary>
        /// Creates the fans or friend.
        /// </summary>
        /// <param name="memberId">The member id.</param>
        public abstract void CreateFansOrFriend(int memberId);

        /// <summary>
        /// Creates the member I like A blog.
        /// </summary>
        /// <param name="memberId">The member id.</param>
        /// <param name="blogId">The blog id.</param>
        /// <returns></returns>
        public abstract bool CreateMemberILikeABlog(int memberId, int blogId);

        /// <summary>
        /// Gets the members I like by blog.
        /// </summary>
        /// <param name="blogId">The blog id.</param>
        /// <returns></returns>
        public abstract IList<Entities.Member> GetMembersILikeByBlog(int blogId);

        /// <summary>
        /// Gets the members I like by blog.
        /// </summary>
        /// <param name="blog">The blog.</param>
        /// <returns></returns>
        public abstract IList<Entities.Member> GetMembersILikeByBlog(Entities.Blog blog);

        /// <summary>
        /// Creates the member I like A image.
        /// </summary>
        /// <param name="memberId">The member id.</param>
        /// <param name="imageId">The image id.</param>
        /// <returns></returns>
        public abstract bool CreateMemberILikeAImage(int memberId, int imageId);

        /// <summary>
        /// Gets the members I like by image.
        /// </summary>
        /// <param name="imageId">The image id.</param>
        /// <returns></returns>
        public abstract IList<Entities.Member> GetMembersILikeByImage(int imageId);

        /// <summary>
        /// Gets the members I like by image.
        /// </summary>
        /// <param name="image">The image.</param>
        /// <returns></returns>
        public abstract IList<Entities.Member> GetMembersILikeByImage(Entities.Image image);

        /// <summary>
        /// Gets the blogs I like by member.
        /// </summary>
        /// <param name="memberId">The member id.</param>
        /// <returns></returns>
        public abstract IList<Entities.Blog> GetBlogsILikeByMember(int memberId);

        /// <summary>
        /// Gets the blogs I like by member.
        /// </summary>
        /// <param name="member">The member.</param>
        /// <returns></returns>
        public abstract IList<Entities.Blog> GetBlogsILikeByMember(Entities.Member member);

        /// <summary>
        /// Gets the images I like by member.
        /// </summary>
        /// <param name="memberId">The member id.</param>
        /// <returns></returns>
        public abstract IList<Entities.Image> GetImagesILikeByMember(int memberId);

        /// <summary>
        /// Gets the images I like by member.
        /// </summary>
        /// <param name="member">The member.</param>
        /// <returns></returns>
        public abstract IList<Entities.Image> GetImagesILikeByMember(Entities.Member member);

        /// <summary>
        /// Gets the member related to node.
        /// </summary>
        /// <returns></returns>
        /// 
        public abstract IList<Entities.Member> GetMemberRelatedToCurrentNode();

        /// <summary>
        /// Gets the member related to parent of current node.
        /// </summary>
        /// <returns></returns>
        public abstract IList<Entities.Member> GetMemberRelatedToParentOfCurrentNode();

        /// <summary>
        /// Returns true if a relationship exists between the parent and the child.
        /// The type of the relation is specified by relationAlias.
        /// </summary>
        /// <param name="parentId">The parent id.</param>
        /// <param name="childId">The child id.</param>
        /// <param name="relationAlias">The relation alias.</param>
        /// <returns></returns>
        public abstract bool RelationshipExists(int parentId, int childId, string relationAlias);

        /// <summary>
        /// Creates the relationship types.
        /// </summary>
        /// <param name="pathToXmlFile">The path to XML file.</param>
        /// <returns></returns>
        /// Only required for setup so removed from provider
        //public abstract bool CreateRelationshipTypes(string pathToXmlFile);


    }
}